//
//  ViewController.m
//  Test
//
//  Created by fh on 2019/10/17.
//  Copyright © 2019 cashchina. All rights reserved.
//

#import "ViewController.h"
#import "VideoRecordVC.h"
#import <VideoToolbox/VideoToolbox.h>
#import "ConfigViC.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
    
}


- (void)setupUI {
    self.view.backgroundColor = [UIColor whiteColor];
    
    {
        UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(50, 100, 90, 50)];
        [button setTitle:@"进入录制" forState:UIControlStateNormal];
        button.titleLabel.font = [UIFont systemFontOfSize:14];
        [self.view addSubview:button];
        button.backgroundColor = [UIColor redColor];
        [button addTarget:self action:@selector(test:) forControlEvents:UIControlEventTouchUpInside];
    }
    
    
    {
        UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(200, 100, 90, 50)];
        [button setTitle:@"进入配置" forState:UIControlStateNormal];
        button.titleLabel.font = [UIFont systemFontOfSize:14];
        [self.view addSubview:button];
        button.backgroundColor = [UIColor redColor];
        [button addTarget:self action:@selector(config:) forControlEvents:UIControlEventTouchUpInside];
    }
    
}


- (void)test:(UIButton *)button {
    VideoRecordVC *vc = [[VideoRecordVC alloc] init];
    [self presentViewController:vc animated:YES completion:nil];
}

- (void)config:(UIButton *)button {
    ConfigViC *vc = [[ConfigViC alloc] init];
    [self presentViewController:vc animated:YES completion:nil];
}



@end
